home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Can Windows DLL identify caller?
- Date: 25 Feb 1996 16:48:01 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4gr001INNi52@keats.ugrad.cs.ubc.ca>
- References: <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>,
- Jon A Barrett <jbarrett@westridg.demon.co.uk> wrote:
- >
- >I've written a DLL in C that supplies 'secure' information to registered
- >programs. I have a relatively safe mechanism to ensure that the registered
- >programs have not been tampered with (checksums, image headers etc) but how
- >can I tell whose calling.
- >
- >Is there anyway that a DLL can identify something about the caller? Obviously
- >it will have to be something implicit, caller supplied parameters would be
- >open to abuse.
-
- Does your OS have user id's? Or at least process id's? These kinds of things
- should be available via a system call to any library function, so that it can
- readily identify the security context under which it is executing.
-
- In a UNIX shared library, I you can call getpid() to get the process id,
- getuid() and geteuid() to get the real and effective user id, and so forth.
- --
-
-